package com.heima.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.article.dtos.ArticleHomeDto;
import com.heima.model.article.pojos.ApArticle;
import com.heima.model.article.pojos.ApArticleContent;
import com.heima.model.common.dtos.ResponseResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;

/**
 * @author lzq
 * @data 2023/4/27 19:46
 */
@Mapper
public interface ArticleHomeMapper extends BaseMapper<ApArticle> {

    //显示文章信息
    List<ApArticle> loadArticleList(@RequestParam("dto") ArticleHomeDto dto
            , @RequestParam("type") Short type);

    /**
     *
     * 获取当前时间之前的五天文章
     * @param dayParam
     */
    List<ApArticle>  daysArticleList(@Param("dayParam") Date dayParam);
}
